﻿using System;


namespace FindMaxByFiveIntegers
{
    class FindMaxByFiveIntegers
    {
        static void Main(string[] args)
        {
            Console.WriteLine("First:");
            int firstNumber = int.Parse(Console.ReadLine());
            Console.WriteLine("Second:");
            int secondNumber = int.Parse(Console.ReadLine());
            Console.WriteLine("Third:");
            int thirdNumber = int.Parse(Console.ReadLine());
            Console.WriteLine("Fourth:");
            int fourthNumber = int.Parse(Console.ReadLine());
            Console.WriteLine("Fifth:");
            int fifthNumber = int.Parse(Console.ReadLine());
            Console.WriteLine();
            if (firstNumber>secondNumber && firstNumber>thirdNumber && firstNumber>fourthNumber && firstNumber>fifthNumber)
            {
                Console.WriteLine("First is greatest.");
            }
            else if (secondNumber>firstNumber && secondNumber > thirdNumber && secondNumber > fourthNumber && secondNumber > fifthNumber)
            {
                Console.WriteLine("Second number is greatest.");
            }
            else if (thirdNumber > secondNumber && thirdNumber > firstNumber && thirdNumber > fourthNumber && thirdNumber > fifthNumber)
            {
                Console.WriteLine("Third number is greatest.");
            }
            //or
            
            else if (fourthNumber>fifthNumber)
            {
                Console.WriteLine("Fourth number is greatest.");
            }
            else if(fifthNumber>fourthNumber)
            {
                Console.WriteLine("Fifth number is greatest.");
            }
            
        }
    }
}
